<template>
  <div>
    <h1>
      {{ count }}
    </h1>
    <button @click="add">点击</button>
  </div>
</template>
<script>
import { ref } from 'vue'
import { defineComponent } from '@vue/composition-api'

export default defineComponent({
  setup() {
    const count = ref(0)
    function add() {
      count.value++
    }
    return {
      count,
      add
    }
  }
})
</script>

<style>
h1 {
  color: red;
}
</style>
<style>
h1 {
  color: red;
}
</style>
